-
Notifications
You must be signed in to change notification settings - Fork 30
fix: Exclude Base64 images from image worker handling #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Exclude Base64 images from image worker handling #500
Conversation
|
I think we should skip the image worker entirely if we know its a |
|
I agree! What do others think? in that case should we leave XMLHttpRequest? on the ImageTexture we use fetch |
|
There's already a fetch function if you skip the image worker, it will automatically fallback to fetch which should work out of the box: as far as I can see extending that if condition with a startsWith should do it? |
wouterlucas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks
In Chrome versions before 67, data: URLs were treated as uncertain-origin resources for security reasons. In this context:
XMLHttpRequest did not allow access to base64 (data:) URLs because it violated CORS (Cross-Origin Resource Sharing) policies. Even though a data: URL is "local," it was still considered a different origin from the domain where the request was made.